package com.xu.mapper;

import com.xu.pojo.Img;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ImgMapper {

    @Select("select product.pname,img.img_rectangle,img.img_square from bread.img join bread.product where img.id=product.id")
    List<Img> queryAllImg();

    @Select("select * from bread.img where id=#{id}")
    Img queryImgById(int id);

}
